<!--#include file="./doctype.html"-->
<title><%=editTitle & bookName%></title>
<link href="<%=siteUrl%>view/style/style2/style.css" rel="stylesheet" />
<link href="<%=siteUrl%>view/style/kindeditor/themes/default/default.css" rel="stylesheet" />
<script src="<%=siteUrl%>view/style/kindeditor/kindeditor-min.js"></script>
<script src="<%=siteUrl%>view/style/kindeditor/lang/zh_CN.js"></script>
</head>
<body>
<div class="wrap">
	<ol class="breadcrumb">
		<li><a href="<%=siteUrl%>"><%=siteName%>首页</a></li>
		<li class="active"><a href="javascript:;" class="reload"><%=editTitle & bookName%></a></li>
	</ol>
	<div class="alert alert-info">
		<span class="close" data-dismiss="alert">&times;</span>
		<strong>提示：</strong>
		<%=bookName%>发表时<strong><% if bookAuditing then%>不<%end if%>须审核</strong>
        发表后1天后不可修改。
        <p>请遵守国家相关法律法规，文明发言！</p>
	</div>
	<form method="post" action="<%=fileName%>" class="mb10" role="form">
        <input type="hidden" name="q" value="save" />
        <input type="hidden" name="id" value="<%=iid%>" />
        <% if iid = 0 then%>
        <div class="form-group fix">
            <div class="inline w30 class_id" data-name="classID" data-id="<%=data(0)%>"></div>
            <label class="inline control-label" for="classID"><%=bookName%>分类</label>
        </div>
        <%end if%>
        <div class="form-group fix">
            <input id="title" name="title" class="form-control inline w30 check_value" placeholder="<%=bookName%>标题" value="<%=data(2)%>" />
            <label class="inline control-label" for="title"><%=bookName%>标题(不能包含特殊字符，字数在5-100字)</label>
        </div>
        <div class="form-group fix">
            <input id="userName" name="userName" class="form-control inline w30 check_value" placeholder="姓名称呼" value="<%=data(1)%>" />
            <label class="inline control-label" for="userName">姓名称呼(字数在2-30字)</label>
        </div>
        <div class="form-group fix">
            <input id="editCode" name="editCode" class="form-control inline w30 check_value" placeholder="编辑码" value="<%=app.getCookie("editCode")%>" />
            <label class="inline control-label" for="editCode">编辑码(4-8位数字，不能以0开头。留空或为0则不可再编辑,输入后不可再修改)</label>
        </div>
        <div class="form-group fix">
             <label class="control-label">
                 <input id="isShow" name="isShow" value="1" type="checkbox" checked="checked"> 是否公开
             </label>
             <label class="inline control-label" for="isShow">如不公开，只有管理员看到，也不可再修改！</label>
        </div>
        <div class="form-group fix">
             <input id="checkCode" name="checkCode" class="form-control inline w10 check_value" placeholder="验证码" value="" size="<%=checkAmount%>" />
             <img data-title="看不清楚，换张图片" src="<%=siteUrl%>code.asp" onclick="this.src='<%=siteUrl%>code.asp?rand='+$.now()" id="check_image" data-url="<%=siteUrl%>code.asp" style="cursor:pointer;"/>
             <label class="inline control-label" for="checkCode">验证码</label>
        </div>
        <div class="form-group fix">
            <label class="inline control-label" for="content"><%=bookName%>内容(10-<%=bookLen%>字[含HTML代码])：(已输入 <span class="red word_count">0</span> 字)</label>
            <textarea id="content" name="content" class="form-control check_value" rows="10" placeholder="<%=bookName%>内容"><%=app.hec(data(3))%></textarea>
        </div>
        <div class="form-group fix text-center submit_box"></div>
	</form>
</div>
<script>
$(document).ready(function() {
    loadEdit('textarea[name="content"]');
$(this)
    .on('click', '#check_image', function() {
        this.src = '<%=siteUrl%>code.asp?rand=' + new Date().valueOf();
    })
})
</script>
</body>
</html>